import React from "react";
import { BrowserRouter, useRoutes } from "react-router-dom";
import { routes_list } from "./routes";

const Index: React.FC = () => {
  const RouterView = () => useRoutes(routes_list)
  return <BrowserRouter>
    <React.Suspense fallback={ <div>路由加载中...</div> }>
      <RouterView></RouterView>
    </React.Suspense>
  </BrowserRouter>;
};

export default Index;
